package com.api.shopapi.service.impl;

import com.api.shopapi.entity.CartGoodsPrice;
import com.api.shopapi.entity.dto.CartGoodsPriceDTO;
import com.api.shopapi.mapper.CartGoodsPriceMapper;
import com.api.shopapi.service.CartGoodsPriceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("CartGoodsPriceServiceImplOne")
public class CartGoodsPriceServiceImpl implements CartGoodsPriceService {

    @Autowired
    private CartGoodsPriceMapper cartGoodsPriceMapper;


    @Override
    public int insert(CartGoodsPrice cartGoodsPrice) {
        return cartGoodsPriceMapper.insert(cartGoodsPrice);
    }

    @Override
    public int delete(String cartGoodsPriceCode){
        return cartGoodsPriceMapper.delete(cartGoodsPriceCode);
    }

    @Override
    public int update(CartGoodsPrice cartGoodsPrice) {
        return cartGoodsPriceMapper.update(cartGoodsPrice);
    }

    @Override
    public List<CartGoodsPriceDTO> getList() {
        return cartGoodsPriceMapper.getList();
    }

    @Override
    public CartGoodsPriceDTO getByCartGoodsPriceCode(String cartGoodsPriceCode) {
        return cartGoodsPriceMapper.getByCartGoodsPriceCode(cartGoodsPriceCode);
    }

    @Override
    public CartGoodsPriceDTO getByCartGoodsCode(String cartGoodsCode){
        return cartGoodsPriceMapper.getByCartGoodsCode(cartGoodsCode);
    }


}
